<template>
  <div class="canvas-static">
    <div class="nav">
      <div
        v-for="item in navList"
        :key="item.value"
        :class="['nav-name', { active: activePage === item.value }]"
        @click="activePage = item.value"
      >
        {{ item.label }}
      </div>
    </div>
    <component :is="activePage"></component>
  </div>
</template>

<script>
import logo from "./children/logo.vue";
import share from "./children/share.vue";
export default {
  components: {
    logo,
    share,
  },
  data() {
    return {
      navList: [
        {
          label: "人寿logo",
          value: "logo",
        },
        {
          label: "海报-分享",
          value: "share",
        },
      ],
      activePage: "logo",
    };
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" >
.canvas-static {
  .nav {
    margin: 20px;
    .nav-name {
      display: inline-block;
      padding: 5px 10px;
    }
    .active {
      color: #2973c6;
    }
  }
  .canvas-item {
    margin: auto;
  }
  .share-img {
    width: 100%;
  }
}
</style>